package com.ruoyi.fantasy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fantasy.mapper.FantasyTaskTodoMapper;
import com.huanzhidadi.fantasy.bean.domain.FantasyTaskTodo;
import com.ruoyi.fantasy.service.IFantasyTaskTodoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 现有任务 服务层实现
 * 
 * @author wanghui
 * @date 2019-07-05
 */
@Service
public class FantasyTaskTodoServiceImpl implements IFantasyTaskTodoService 
{
	@Autowired
	private FantasyTaskTodoMapper fantasyTaskTodoMapper;

	/**
     * 查询现有任务信息
     * 
     * @param id 现有任务ID
     * @return 现有任务信息
     */
    @Override
	public FantasyTaskTodo selectFantasyTaskTodoById(Long id)
	{
	    return fantasyTaskTodoMapper.selectFantasyTaskTodoById(id);
	}
	
	/**
     * 查询现有任务列表
     * 
     * @param fantasyTaskTodo 现有任务信息
     * @return 现有任务集合
     */
	@Override
	public List<FantasyTaskTodo> selectFantasyTaskTodoList(FantasyTaskTodo fantasyTaskTodo)
	{
	    return fantasyTaskTodoMapper.selectFantasyTaskTodoList(fantasyTaskTodo);
	}
	
    /**
     * 新增现有任务
     * 
     * @param fantasyTaskTodo 现有任务信息
     * @return 结果
     */
	@Override
	public int insertFantasyTaskTodo(FantasyTaskTodo fantasyTaskTodo)
	{
	    return fantasyTaskTodoMapper.insertFantasyTaskTodo(fantasyTaskTodo);
	}
	
	/**
     * 修改现有任务
     * 
     * @param fantasyTaskTodo 现有任务信息
     * @return 结果
     */
	@Override
	public int updateFantasyTaskTodo(FantasyTaskTodo fantasyTaskTodo)
	{
	    return fantasyTaskTodoMapper.updateFantasyTaskTodo(fantasyTaskTodo);
	}

	/**
     * 删除现有任务对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteFantasyTaskTodoByIds(String ids)
	{
		return fantasyTaskTodoMapper.deleteFantasyTaskTodoByIds(Convert.toStrArray(ids));
	}
	
}
